<template>
  <div>
    <button>PractiseTwo</button>
  </div>
</template>
<script lang="ts">
/**
 * 页面核心数据结构体说明文档
 *
 *
 */
// import from

export default defineComponent({
  name: 'PractiseTwo',
  props: {
    sampleP: {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
      sampleD: 'value',
      billOne: {
        billId: 'BI100',
        applier: 'zhangsan',
        supplier: '蒙牛'
      },
      billItem: {
        itemId: 1,
        title: '酸奶',
        price: 11,
        quantity: 10,
        billFk: 'BI100'
      },
      // 人类的思维是喜欢树形结构
      // 数据格式转化 格式化
      // 扁平化结构 - 树形结构
      billModels: [
        {
          billId: 'BI100',
          applier: 'zhangsan',
          supplier: '蒙牛',
          items: [{itemId: 1,title: '酸奶', price: 11, quantity: 10, billFk: 'BI100'
            },{ itemId: 2, title: '纯牛奶', price: 3, quantity: 22,  billFk: 'BI100'
            }
          ]
        },
        {
          billId: 'BI101',
          applier: 'zhangsan',
          supplier: '伊利',
          items: [{itemId: 1,  title: '酸奶',price: 11,  quantity: 10, billFk: 'BI101'},
            { itemId: 2, title: '纯牛奶', price: 3, quantity: 22, billFk: 'BI101'
            }
          ]
        }
      ],
      billModel: {
        billId: 'BI100',
        applier: 'zhangsan',
        supplier: '蒙牛',
        items: [
          {
            itemId: 1,
            title: '酸奶',
            price: 11,
            quantity: 10,
            billFk: 'BI100'
          },
          {
            itemId: 2,
            title: '纯牛奶',
            price: 3,
            quantity: 22,
            billFk: 'BI100'
          }
        ]
      },
      billEx: [
        {
          billId: 'BI100',
          applier: 'zhangsan',
          supplier: '蒙牛',

          itemId: 1,
          title: '酸奶',
          price: 11,
          quantity: 10,
          billFk: 'BI100'
        },
        {
          billId: 'BI100',
          applier: 'zhangsan',
          supplier: '蒙牛',

          itemId: 2,
          title: '纯牛奶',
          price: 3,
          quantity: 22,
          billFk: 'BI100'
        },
        {
          billId: 'BI101',
          applier: 'zhangsan',
          supplier: '伊利',

          itemId: 1,
          title: '纯牛奶',
          price: 3,
          quantity: 22,
          billFk: 'BI101'
        },
        {
          billId: 'BI101',
          applier: 'zhangsan',
          supplier: '伊利',

          itemId: 2,
          title: '酸奶',
          price: 3,
          quantity: 22,
          billFk: 'BI101'
        }
      ]
    }
  },
  computed: {
    /* sampleC() {
      return this.sampleD + "--";
    }, */
  },
  created() {},
  mounted() {},
  methods: {
    // sampleM() {},
  },
  watch: {
    // sampleP(n, o) {},
  }
})
</script>

<!--<style scoped>-->
<style lang="scss" scoped></style>
